package userModel

import (
	"gitee.com/libwiki/go-zero-lib/models"
	"gitee.com/libwiki/go-zero-lib/package/orm/vars"
)

type User struct {
	Code          string        `json:"code" gorm:"type:varchar(64);comment:商品货源唯一code"`
	Nickname      string        `json:"nickname" gorm:"type:varchar(16);comment:昵称"`
	RealName      string        `json:"real_name" gorm:"type:varchar(64);comment:真实姓名"`
	Avatar        string        `json:"avatar" gorm:"comment:头像"`
	Phone         string        `json:"phone" gorm:"type:char(11);comment:联系电话"`
	PhoneArea     int           `json:"phone_area" gorm:"type:char(11);comment:联系电话区号"`
	Password      string        `json:"password" gorm:"type:varchar(64);comment:登录密码"`
	Status        bool          `json:"status" gorm:"type:varchar(64);comment:启用、禁用"`
	LastLoginIp   string        `json:"last_login_ip" gorm:"type:varchar(64);comment:最后登录IP"`
	Gender        vars.Enum     `json:"gender" gorm:"default:male;type:enum('male','female');comment:性别"`
	LastLoginTime vars.Datetime `json:"last_login_time" gorm:"comment:最后登录时间"`

	models.BaseModel
	models.DeleteField
}
